package com.cn.study008;

import java.util.Arrays;

/**
 * @author lw
 * @ClassName Test8006.java
 * @Description
 * @createTime 2023年05月14日 18:03:00
 */
public class Test8006 {
    public static void main(String[] args) {
        char[] c=new char[]{'a','c','u','b','e','p','f','z'};
        System.out.print("原字符序列：");
        for (char str:c) {
            System.out.print(str+" ");
        }
        Arrays.sort(c);
        System.out.print("\n升序排序后：");
        for (char str:c) {
            System.out.print(str+" ");
        }
        System.out.print("\n逆序输出为：");
        for (int i=c.length-1;i>=0;i--) {
            System.out.print(c[i]+" ");
        }
    }
}
